#ifndef __RECT_H__
#define __RECT_H__

#include "SDLHeaders.h"

class Rect
{
public:
	Rect operator ()() {
		return _rect;
	}

	Surface(SDL_Rect* rect = NULL) 
		: _rect(rect),
		  _is_owner(false) {
		if(!rect) {
			_is_owner = true;
			_rect = new SDL_Rect();
		}
	};

	virtual ~Surface(void) {
		if(_is_owner) {
			delete _rect;
		}
	}

private:
	SDL_Rect*	_rect;
	bool    _is_owner;
};

#endif